import sys
from PyQt5.QtWidgets import QApplication
from gui.main_window import MainWindow

def main():
    print("启动应用程序...")
    app = QApplication(sys.argv)
    
    print("创建主窗口...")
    window = MainWindow()
    window.show()
    print("主窗口已显示")
    
    print("进入主事件循环")
    # 运行应用
    sys.exit(app.exec_())

if __name__ == "__main__":
    print("程序入口")
    main()
